From d3e75895a994fa87640cf04c27314b1ff935675c Mon Sep 17 00:00:00 2001 From: Michael Henning Date: Sun, 29 Sep 2013 12:48:04 -0400 Subject: [PATCH] base: For RGB->Y, use sRGB primaries that are adapted to a D50 illuminant. Thanks to Elle Stone for pointing this out. --- babl/base/rgb-constants.h | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/babl/base/rgb-constants.h b/babl/base/rgb-constants.h index 8f8b410..0e47056 100644 --- a/babl/base/rgb-constants.h +++ b/babl/base/rgb-constants.h @@ -16,21 +16,16 @@ * . */ -#if 0 -#define CONTEMPORARY_MONITOR -#endif +/* + * These primaries have been adapted for a D50 illuminant. + * + * They were taken from here: + * http://www.brucelindbloom.com/WorkingSpaceInfo.html#AdaptedPrimaries + * + * For more information, see this thread: + * https://mail.gnome.org/archives/gimp-developer-list/2013-September/msg00113.html + */ -#ifdef CONTEMPORARY_MONITOR - /* source: http://www.poynton.com/ColorFAQ.html */ - #define RGB_LUMINANCE_RED (0.212671) - #define RGB_LUMINANCE_GREEN (0.715160) - #define RGB_LUMINANCE_BLUE (0.072169) -#else - /* this is not correct, but the constants are kept around */ - #define RGB_LUMA_RED (0.299) - #define RGB_LUMA_GREEN (0.587) - #define RGB_LUMA_BLUE (0.114) - #define RGB_LUMINANCE_RED RGB_LUMA_RED - #define RGB_LUMINANCE_GREEN RGB_LUMA_GREEN - #define RGB_LUMINANCE_BLUE RGB_LUMA_BLUE -#endif +#define RGB_LUMINANCE_RED (0.222491) +#define RGB_LUMINANCE_GREEN (0.716888) +#define RGB_LUMINANCE_BLUE (0.060621) -- 2.30.2